\section{Test Case Design}
This section describes test scenarios designed for persistent storage
and atomic transaction funtionalities. ShardKV++ is able to pass all
test scenarios.

\subsection{Persistent Paxos Test}
\begin{itemize}
\item \textbf{TestSystemFailure}: During decision of an instance, make Paxos
that are not proposing crash.  If less than half of the Paxos crash,
then check if the majoriry makes an agreement; otherwise check if the
agreement is not made until the recovery of the crashed Paxos.

After decision made on an instance, make more than half of the Paxos
crash and after rebooting them, check whether all Paxos have the same
value for the instance.
\item \textbf{TestDiskFailure}: Delete all the log for
$\lfloor(n-1)/2\rfloor$ number of Paxos, check whether the majority of
Paxos have the same value for previously agreed instances, delete all
logs for another $\lfloor(n-1)/2\rfloor$ number of Paxos, and check
whether the majority of Paxos have the same value for previously
agreed instances.
\item \textbf{TestManyPersistence}: Many random combinations of tests
above and the unreliablity of the network.
\end{itemize}


\subsection{Atomic Transaction Test}
\begin{itemize}
\item \textbf{TestBasic}: Transactions under normal condition;
\item \textbf{TestTransactionLock}: Check if Put operation can be done
during transaction; Check if Get operation return the old value during
transaction; Check if Reconfiguration can happen during transaction;
Check if transaction can happen during Reconfiguration; Check if a
transaction can happen during another transaction;
\item \textbf{TestTransactionConcurrency}: Many randomized combination
of Put/Get operations, transactions and the unreliablity of the
network.
\end{itemize}

%\subsection{Demo Settings}
%\subsubsection{Network Layout}
%We use three different machines (A,B,C) communicating through TCP.
%\begin{enumerate}
%\item Shardmaster Server: one on Machine A, without replica group
%\item Shardmaster Client: one on Machine B, which can join/leave/move shard replica group
%\item ShardKV Server Group: one on each of Machine B,C, with three local replicas simulated by local file system
%\item ShardKV Client: one on Machine A, which can put/get/puts value through Shardmaster Server
%\end{enumerate}
%\subsubsection{Demo Task}
%% comment: Peng may fill sth. more
%\begin{enumerate}
%\item DemoBasic: put/get/sharding key/value
%\item DemoPersistency: Reboot one ShardKV Server literally and the client can still get the same value
%\item DemoTwoPhaseCommit: Set a delay in a transaction and check if the ShardKV Client can put/get and Shardmaster Client can join/leave 
%\end{enumerate}

